import axios from 'axios'


export function getLocation(params) {
  return axios({
    url: 'https://restapi.amap.com/v3/ip',
    method: 'get',
    params: params
  })
}
export function getAround(params) {
  return axios({
    url: 'https://restapi.amap.com/v5/place/around',
    method: 'get',
    params: params
  })
}
export function getDisarea(params) {
  return axios({
    url: 'https://restapi.amap.com/v3/config/district',
    method: 'get',
    params: params
  })
}
export function getAdress(params) {
  return axios({
    url: 'https://restapi.amap.com/v5/place/text',
    method: 'get',
    params: params
  })
}
export function getPosition(params) {
  return axios({
    url: 'https://restapi.amap.com/v3/geocode/regeo?parameters',
    method: 'get',
    params: params
  })
}
export function getTianPosition(params) {
  return axios({
    url: 'https://api.tianditu.gov.cn/geocoder',
    method: 'get',
    params: params
  })
}
export function getTianPeriphery(params) {
  return axios({
    url: 'https://api.tianditu.gov.cn/v2/search',
    method: 'get',
    params: params
  })
}
export function getTianAdministrative(params) {
  return axios({
    url: 'https://api.tianditu.gov.cn/administrative',
    method: 'get',
    params: params
  })
}